You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2006/06/10 18:55:57 UTC

svn commit: r413331 - in /tapestry/tapestry4/trunk: examples/TimeTracker/src/java/org/apache/tapestry/timetracker/model/ examples/TimeTracker/src/java/org/apache/tapestry/timetracker/page/ framework/src/java/org/apache/tapestry/ framework/src/java/org/...

Author: jkuhnert
Date: Sat Jun 10 09:55:55 2006
New Revision: 413331

URL: http://svn.apache.org/viewvc?rev=413331&view=rev
Log:
Added new dtd, fixed manual string uglyness / added more parameters to Autocompleter

Added:
    tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/Tapestry_4_1.dtd
Modified:
    tapestry/tapestry4/trunk/examples/TimeTracker/src/java/org/apache/tapestry/timetracker/model/Project.java
    tapestry/tapestry4/trunk/examples/TimeTracker/src/java/org/apache/tapestry/timetracker/page/TaskEntryPage.java
    tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/AbstractComponent.java
    tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java
    tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.jwc
    tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.script
    tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java

Modified: tapestry/tapestry4/trunk/examples/TimeTracker/src/java/org/apache/tapestry/timetracker/model/Project.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/examples/TimeTracker/src/java/org/apache/tapestry/timetracker/model/Project.java?rev=413331&r1=413330&r2=413331&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/examples/TimeTracker/src/java/org/apache/tapestry/timetracker/model/Project.java (original)
+++ tapestry/tapestry4/trunk/examples/TimeTracker/src/java/org/apache/tapestry/timetracker/model/Project.java Sat Jun 10 09:55:55 2006
@@ -73,4 +73,34 @@
     {
         _name = name;
     }
+
+    /** 
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + (int) (_id ^ (_id >>> 32));
+        result = prime * result + ((_name == null) ? 0 : _name.hashCode());
+        return result;
+    }
+    
+    /** 
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean equals(Object obj)
+    {
+        if (this == obj) return true;
+        if (obj == null) return false;
+        if (getClass() != obj.getClass()) return false;
+        final Project other = (Project) obj;
+        if (_id != other._id) return false;
+        if (_name == null) {
+            if (other._name != null) return false;
+        } else if (!_name.equals(other._name)) return false;
+        return true;
+    }
 }

Modified: tapestry/tapestry4/trunk/examples/TimeTracker/src/java/org/apache/tapestry/timetracker/page/TaskEntryPage.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/examples/TimeTracker/src/java/org/apache/tapestry/timetracker/page/TaskEntryPage.java?rev=413331&r1=413330&r2=413331&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/examples/TimeTracker/src/java/org/apache/tapestry/timetracker/page/TaskEntryPage.java (original)
+++ tapestry/tapestry4/trunk/examples/TimeTracker/src/java/org/apache/tapestry/timetracker/page/TaskEntryPage.java Sat Jun 10 09:55:55 2006
@@ -21,6 +21,7 @@
 import org.apache.tapestry.annotations.Component;
 import org.apache.tapestry.annotations.EventListener;
 import org.apache.tapestry.annotations.InjectObject;
+import org.apache.tapestry.annotations.Persist;
 import org.apache.tapestry.dojo.form.Autocompleter;
 import org.apache.tapestry.form.BeanPropertySelectionModel;
 import org.apache.tapestry.form.DatePicker;
@@ -47,6 +48,7 @@
     @InjectObject("service:timetracker.dao.ProjectDao")
     public abstract ProjectDao getProjectDao();
     
+    @Persist("session")
     public abstract Project getSelectedProject();
     
     @Component(type = "DatePicker", id = "startPicker",

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/AbstractComponent.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/AbstractComponent.java?rev=413331&r1=413330&r2=413331&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/AbstractComponent.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/AbstractComponent.java Sat Jun 10 09:55:55 2006
@@ -678,6 +678,9 @@
             _rendering = false;
             
             cleanupAfterRender(cycle);
+            
+            // @since 4.1
+            _clientId = null;
         }
     }
 

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java?rev=413331&r1=413330&r2=413331&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java Sat Jun 10 09:55:55 2006
@@ -31,6 +31,7 @@
 import org.apache.tapestry.form.ValidatableField;
 import org.apache.tapestry.form.ValidatableFieldSupport;
 import org.apache.tapestry.json.IJSONWriter;
+import org.apache.tapestry.json.JSONObject;
 import org.apache.tapestry.valid.ValidatorException;
 
 /**
@@ -42,6 +43,8 @@
 public abstract class Autocompleter extends AbstractFormWidget 
     implements ValidatableField, IJSONRender, IDirect
 {
+    // mode, can be remote or local (local being from html rendered option elements)
+    private static final String MODE_REMOTE = "remote";
     
     /**
      * 
@@ -57,9 +60,6 @@
         if (isDisabled())
             writer.attribute("disabled", "disabled");
         
-        if (getSubmitOnChange())
-            writer.attribute("onchange", "javascript:   this.form.events.submit();");
-        
         renderIdAttribute(writer, cycle);
         
         renderDelegateAttributes(writer, cycle);
@@ -80,11 +80,11 @@
         Map parms = new HashMap();
         parms.put("id", getClientId());
         
-        StringBuffer str = new StringBuffer("{");
-        str.append("dataUrl:'").append(link.getURL()).append("&filter=%{searchString}',")
-        .append("mode:'remote',")
-        .append("widgetId:'").append(getName()).append("', ")
-        .append("name:'").append(getName()).append("' ");
+        JSONObject json = new JSONObject();
+        json.put("dataUrl", link.getURL() + "&filter=%{searchString}");
+        json.put("mode", MODE_REMOTE);
+        json.put("widgetId", getName());
+        json.put("name", getName());
         
         IPropertySelectionModel model = getModel();
         if (model == null)
@@ -97,16 +97,13 @@
             Object option = model.getOption(i);
             
             if (isEqual(option, value)) {
-                str.append(", value:'").append(model.getValue(i)).append("',")
-                .append("label:'").append(model.getLabel(i))
-                .append("'");
+                json.put("value", model.getValue(i));
+                json.put("label", model.getLabel(i));
                 break;
             }
         }
         
-        str.append("}");
-        
-        parms.put("props", str.toString());
+        parms.put("props", json.toString());
         
         PageRenderSupport prs = TapestryUtils.getPageRenderSupport(cycle, this);
         getScript().execute(cycle, prs, parms);
@@ -204,9 +201,18 @@
     /** @since 4.1 */
     public abstract boolean isFilterOnChange();
     
-    /** @since 2.2 * */
-    public abstract boolean getSubmitOnChange();
-
+    /** whether or not to autocomplete the input text. */
+    public abstract boolean isAutocomplete();
+    
+    /** How long to wait(in ms) before searching after input is received. */
+    public abstract int getSearchDelay();
+    
+    /** The duration(in ms) of the fade effect of list going away. */
+    public abstract int getFadeTime();
+    
+    /** The maximum number of items displayed in select list before the scrollbar is activated. */
+    public abstract int getMaxListLength();
+    
     /** @since 2.2 * */
     public abstract Object getValue();
 

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.jwc
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.jwc?rev=413331&r1=413330&r2=413331&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.jwc (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.jwc Sat Jun 10 09:55:55 2006
@@ -35,11 +35,13 @@
 
   <parameter name="filterOnChange" default-value="false" />
   
-  <parameter name="submitOnChange" deprecated="true">
-  	<description>
-  	Enables logic to submit containing form when value changes.
-  	</description>
-  </parameter>
+  <parameter name="autocomplete" default-value="true" />
+  
+  <parameter name="searchDelay" default-value="100" />
+  
+  <parameter name="fadeTime" default-value="200" />
+  
+  <parameter name="maxListLength" default-value="8" />
   
   <parameter name="displayName"/>
   <parameter name="validators"/>

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.script
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.script?rev=413331&r1=413330&r2=413331&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.script (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.script Sat Jun 10 09:55:55 2006
@@ -17,11 +17,12 @@
         </unique>
     </body>
     <initialization>
-        tapestry.widget.synchronizeWidgetState("${id}", "Select", ${props});
-        if (${props}["label"] &amp;&amp; ${props}["value"]){
+        var ${id}prop=${props};
+        tapestry.widget.synchronizeWidgetState("${id}", "Select", ${id}prop);
+        if (${id}prop["label"] &amp;&amp; ${id}prop["value"]){
             var selw=dojo.widget.byId("${id}");
-            selw.setValue(${props}["value"]);
-            selw.setLabel(${props}["label"]);
+            selw.setValue(${id}prop["value"]);
+            selw.setLabel(${id}prop["label"]);
         }
     </initialization>
 </script>

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java?rev=413331&r1=413330&r2=413331&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java Sat Jun 10 09:55:55 2006
@@ -204,6 +204,10 @@
 
     public static final String TAPESTRY_DTD_4_0_PUBLIC_ID = "-//Apache Software Foundation//Tapestry Specification 4.0//EN";
 
+    /** @since 4.1 */
+    
+    public static final String TAPESTRY_DTD_4_1_PUBLIC_ID = "-//Apache Software Foundation//Tapestry Specification 4.1//EN";
+    
     private static final int STATE_ALLOW_DESCRIPTION = 2000;
 
     private static final int STATE_ALLOW_PROPERTY = 2001;
@@ -1750,6 +1754,12 @@
             return getDTDInputSource("Tapestry_4_0.dtd");
         }
 
+        if (TAPESTRY_DTD_4_1_PUBLIC_ID.equals(publicId)) 
+        {
+            _dtd40 = true;
+            return getDTDInputSource("Tapestry_4_1.dtd");
+        }
+        
         if (TAPESTRY_DTD_3_0_PUBLIC_ID.equals(publicId))
             return getDTDInputSource("Tapestry_3_0.dtd");
 

Added: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/Tapestry_4_1.dtd
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/Tapestry_4_1.dtd?rev=413331&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/Tapestry_4_1.dtd (added)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/Tapestry_4_1.dtd Sat Jun 10 09:55:55 2006
@@ -0,0 +1,472 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+The DTD for Tapestry application, library, page and component specifications.
+Associated with the public identifier:
+
+	-//Apache Software Foundation//Tapestry Specification 4.0//EN
+	
+The canonical location for the DTD is:
+
+	http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd
+
+For application specifications, the root element is application.
+
+For component specifications, the root element is component-specification.
+
+For page specifications, the root element is page-specification.
+
+For library specifiations, the root element is library-specification.
+
+This DTD represents a significant change from (and simplification of) the 3.0 DTD. 
+Tapestry 4.0 will continue to parse specifications that use the 3.0 DTD for the
+forseable future.
+
+The following changes have occured:
+
+- <service> has been removed; it was used to define engine services, which
+  is now accomplished using the HiveMind tapestry.services.ApplicationServices
+  configuration point.
+- <static-binding>, <inherited-binding> and <message-binding> elements have been removed.
+  There is now just <binding>, whose value attribute contains a prefix to interpret how
+  the remainder of the value is interpreted (no prefix meaning a literal, or static, value).
+- <property> renamed to <meta> and <property-specification> renamed to <property>
+- Removed the type attribute from <property>
+- <property> persistent attribute is now called "persist", and is a string, not a boolean
+- Added <inject>
+- Removed the direction and type attributes from <parameter>
+- Consolidated <context-asset>, <private-asset> and <external-asset> into <asset>
+- Consolidated <set-property> and <set-message-property> into <set>
+- More flexibility on the order of elements
+- Added property attribute to <component>, <bean> and <asset>
+- Removed the type attribute from the <configure> element
+- Added many alternatives to 'yes' and 'no' for boolean attributes.
+- Added aliases and cache attributes to <parameter>
+- Added deprecated to <component-specification>
+- Removed <listener-binding>
+-->
+<!-- =======================================================
+Entity: attribute-flag
+
+For entity attributes that take a boolean value.
+-->
+<!ENTITY % attribute-flag "(yes|no|true|false|on|off|1|0|y|n|t|f|aye|nay)">
+<!ENTITY % library-content "(description?, (meta|page|component-type|library|extension)*)">
+<!-- =======================================================
+Element: application
+Root element
+
+Defines a Tapestry application.
+
+Attributes:
+  name: A textual name used to uniquely identify the application.
+  engine-class:  The Java class to instantiate as the application engine.
+-->
+<!ELEMENT application %library-content;>
+<!ATTLIST application
+	name CDATA #IMPLIED
+	engine-class CDATA #IMPLIED
+>
+<!-- =======================================================
+Element: asset
+Contained by: component-specification, page-specification
+
+An asset that may be referenced by the component. Different prefixes
+may be applied to the path indicate where the asset is stored; 
+context: for the web application context folder or classpath:
+for a file stored in the web applications' classpath.
+
+Attributes:
+  name: The name of the asset.
+  path: The path for the resource, which may be relative or absolute.
+  property: The name of a property that will be created to inject the
+    asset into the component.
+-->
+<!ELEMENT asset (meta*)>
+<!ATTLIST asset
+	name CDATA #REQUIRED
+	path CDATA #REQUIRED
+  property CDATA #IMPLIED
+>
+  <!-- =======================================================
+Element: bean
+Appears in: component-specification, page-specification
+
+Defines a JavaBean that will be used in some way by the component.  Beans
+are accessible via the components' beans property (which contains a property
+for each bean).  Beans are created as needed, and are discarded based on
+the lifecycle attribute.  Beans are typically used to extend the
+implementation of a component via aggregation.
+
+Attributes:
+  name: the name of the bean
+  class: the Java class to instantiate
+  lifecycle: when the reference to the bean should be discard
+  	"none" no lifecycle, the bean is created and returned, but not stored
+  	"request" the bean is retained until the end of the request cycle
+  	"page" the bean is retained for the lifespan of the page
+  	"render" (default) the bean is retained until the end of the current page render
+  property: if specified, then a read-ony property is created in the component
+    to access the bean.
+    
+Nothing prevents a bean for storing state; however, such state will
+not be associated with any particular session (unlike persistant page
+properties).  Further, because of page pooling, subsequent requests
+from the same client may be serviced by different instances of a page and
+(therefore) different bean instances.
+
+Beans that have the "request" lifecycle may be stored into a pool
+for later re-use (in the same or different page).
+
+The bean may have its properties set.  Properties are set on both
+newly instantiated beans, and beans that are retrieved from a pool.
+
+-->
+<!ELEMENT bean (description?, (meta|set)*)>
+<!ATTLIST bean
+	name CDATA #REQUIRED
+	class CDATA #REQUIRED
+	lifecycle (none | request | page | render) "request"
+  property CDATA #IMPLIED
+>
+<!-- =======================================================
+Element: binding
+Appears in: component
+
+Binds a parameter of the component to a value. The value may
+be literal, an OGNL expression, or something else, as
+determined by its prefix. The value attribute is optional,
+if not provided, the enclosed character data is the value
+(but it is not allowed to specify both value and character data).
+
+Attributes:
+  name: The name of the component parameter to bind.
+  value The value to bind to the parameter.
+-->
+<!ELEMENT binding (#PCDATA)>
+<!ATTLIST binding
+	name CDATA #REQUIRED
+	value CDATA #IMPLIED
+>
+<!-- =======================================================
+Element: inherited-binding
+Appears in: component
+
+Binds a parameter of the component to a parameter of the container.
+
+Attributes:
+  name: The name of the component parameter to bind.
+  parameter-name: The name of the container parameter to bind the
+    component parameter to.
+-->
+<!ELEMENT inherited-binding EMPTY>
+<!ATTLIST inherited-binding
+	name CDATA #REQUIRED
+	parameter-name CDATA #REQUIRED
+>
+<!-- =======================================================
+Element: configure
+Appears in: extension
+
+Configures one JavaBean property of an extension.
+
+Attributes:
+  property:  The name of the property to configure.
+  value: The value to be converted and applied.  If not 
+    specified, the element's character data is
+    used.  
+ 
+-->
+<!ELEMENT configure (#PCDATA)>
+<!ATTLIST configure
+	property CDATA #REQUIRED
+	value CDATA #IMPLIED
+>
+<!-- =======================================================
+Element: component
+Contained by: component-specification, page-specification
+
+Defines a component contained by the component being specified.
+
+Attribute:
+  id: A unique identifier for the component within the container.
+  type: The type of component, either a well known logical name, or the complete path
+    to the component's specification.
+  copy-of: The id of a previously defined component; this component will be a copy
+    of the other component.
+  inherit-informal-parameters: If yes, then all informal parameters of the containing
+    component are copied into this component.
+  property: Optional property name; the component instance will be injected into this
+    property.
+
+The Tapestry page loader ensures that either type or copy-of is specified, but not both.
+-->
+<!ELEMENT component (meta | binding | inherited-binding )*>
+<!ATTLIST component
+	id ID #REQUIRED
+	type CDATA #IMPLIED
+	copy-of IDREF #IMPLIED
+	inherit-informal-parameters %attribute-flag; "no"
+  property CDATA  #IMPLIED
+>
+<!-- =======================================================
+Element: component-type
+Contained by: application
+
+Establishes a short logic name for a particular component that is used
+within the application.
+
+Attributes:
+  type: The logical name for the component.
+  specification-path:  The complete path to the component's specification.
+-->
+<!ELEMENT component-type EMPTY>
+<!ATTLIST component-type
+	type CDATA #REQUIRED
+	specification-path CDATA #REQUIRED
+>
+<!-- =======================================================
+Element: component-specification
+Root element
+
+A component specification.  It's attributes define the Java class to
+instantiate, whether the component may wrap other elements, and whether
+informal (undeclared) parameters are allowed.  Very similar to a page-specification,
+except that component-specification allows for parameters (formal and informal).
+
+Attributes:
+  class: The Java class to instantiate for the component.
+  allow-body:  If yes (the default), the component may wrap other elements (have a body).
+  allow-informal-parameters:  If yes (the default), informal parameters (parameters that are not
+    explictily defined) are allowed.
+  deprecated: If yes, then using the component will generate a warning, advising the user
+    to find a different component. The default is no.
+-->
+<!ELEMENT component-specification (description?, (parameter | reserved-parameter | meta | bean | component | asset | property | inject )*)>
+<!ATTLIST component-specification
+	class CDATA #IMPLIED
+	allow-body %attribute-flag; "yes"
+	allow-informal-parameters %attribute-flag; "yes"
+  deprecated %attribute-flag; "no"
+>
+<!-- =======================================================
+Element: description
+Appears in: many
+
+Several elements may contain descriptions; these descriptions are
+optional.  The eventual goal is to provide help in some form of IDE.
+Currently, descriptions are optional and ignored.
+
+-->
+<!ELEMENT description (#PCDATA)>
+<!-- =======================================================
+Element: extension
+Contained by: application, library-specification
+
+Defines an extension, an object that is instantiated and configured
+(like a helper bean) and is then accessible, by name, from the
+containing library (or application).
+
+Attributes:
+  name: Name of the extension.
+  class: Java class to instantiate.
+  immediate: If true, the extension is instantiated early instead of as-needed.
+  
+-->
+<!ELEMENT extension (meta | configure)* >
+<!ATTLIST extension
+	name CDATA #REQUIRED
+	class CDATA #REQUIRED
+	immediate %attribute-flag; "no"
+>
+<!-- =======================================================
+Element: inject
+Contained by: component-specification, page-specification
+
+Defines a new property whose read-only value is an object
+obtained from HiveMind.
+
+Attributes:
+  property The name of the property.
+  type: The type of object to be injected, used to interpret
+    the meaning of the object attribute.
+  object: The locator used to obtain the value.
+-->
+<!ELEMENT inject EMPTY>
+<!ATTLIST inject
+  property CDATA #REQUIRED
+  type CDATA "object"
+  object CDATA #REQUIRED
+>
+
+<!-- =======================================================
+Element: library
+Appears in: application-specification, library-specification
+
+Defines a library used in the construction of the container
+(either another library, or the application itself).
+
+Attributes:
+  id: An identifier used to reference pages and components
+    provided by the library.
+  specification-path: The path to the resource that provides
+    the library specification.
+-->
+<!ELEMENT library EMPTY>
+<!ATTLIST library
+	id CDATA #REQUIRED
+	specification-path CDATA #REQUIRED
+>
+<!-- =======================================================
+Element: library-specification
+Root element
+
+Defines a library that may be used in the construction 
+of an application (or another library).  An application can
+be thought of as a specialized kind of library.
+
+-->
+<!ELEMENT library-specification %library-content;>
+<!-- =======================================================
+Element: page
+Contained by: application, library-specification
+
+Defines a single page within the application.  Each application will contain
+at least one of these, to define the Home page.
+
+Attributes:
+  name: A unique name for the application.
+  specification-path:  The resource classpath of the component specification
+    for the page.
+-->
+<!ELEMENT page EMPTY>
+<!ATTLIST page
+	name CDATA #REQUIRED
+	specification-path CDATA #REQUIRED
+>
+<!-- =======================================================
+Element: meta
+Contained by: (many other elements)
+
+Defines a key/value pair associated with the application or component specification.  Properties
+are used to capture information that doesn't fit into the DTD.  The value for the property is
+either the value attribute, or the PCDATA wrapped by the property tag 
+(which is trimmed of leading and trailing whitespace).
+
+This should not be confused with several other tags which are used to set JavaBeans properties
+of various objects.  The <property> tag exists to allow meta-data to be stored in the specification.
+
+Attributes:
+  key: The name of the property to set.
+  value: If specified, is the value of the property, otherwise, the PCDATA is used.
+  
+-->
+<!ELEMENT meta (#PCDATA)>
+<!ATTLIST meta
+	key CDATA #REQUIRED
+	value CDATA #IMPLIED
+>
+<!-- =======================================================
+Element: page-specification
+Root element
+
+A page specification.  It's attributes define the Java class to
+instantiate.  Pages are like components, except they always allow
+a body, and never allow parameters (formal or otherwise).
+
+Attributes:
+  class: The Java class to instantiate for the component.
+-->
+<!ELEMENT page-specification (description?,  (meta| bean | component | asset | property | inject )*)>
+<!ATTLIST page-specification
+	class CDATA #IMPLIED
+>
+<!-- =======================================================
+Element: parameter
+Contained by: component-specification
+
+Defines a formal parameter for the component.
+
+Attributes:
+  name: A unique name for the parameter.
+  required: If yes, then the parameter must be bound.  If no (the default),
+    then the parameter is optional.
+  property: The name to use, instead of the parameter name, for the
+    JavaBean property connected to this parameter.
+  default-value: Specifies the default value for the parameter, if not bound,
+    as a binding reference.
+  cache: If true (the default), then the parameter property will cache the binding value
+   If false, then each access to the property will re-acquire the the current value
+   for the binding on each access (though invariant bindings may still be cached).
+  aliases: An optional, comma-seperated list of aliases for the parameter. Used to allow
+    compatibility when parameter names are changed.
+  deprecated: If true, then using the parameter will generate a runtime warning.
+-->
+<!ELEMENT parameter (description?)>
+<!ATTLIST parameter
+	name CDATA #REQUIRED
+	required %attribute-flag; "no"
+	property CDATA #IMPLIED
+	default-value CDATA #IMPLIED
+  cache %attribute-flag; "yes"
+  aliases CDATA #IMPLIED
+  deprecated %attribute-flag; "no"
+>
+<!-- =======================================================
+Element: property
+Appears in: page-specification, component-specification
+
+Identifies a transient or persistent property.
+
+Attributes:
+  name: The name of the property.
+  persist: The name of the strategy for persisting the property between requests, 
+   or leave blank for no persistence (that is, a transient property).  
+   "session" is the most common strategy.
+  initial-value:  If provided, this is an OGNL expression used
+    to initialize the property.  If not specified, the
+    body of the element is used as the initial value.
+    
+-->
+<!ELEMENT property (#PCDATA)>
+<!ATTLIST property
+	name CDATA #REQUIRED
+	persist CDATA #IMPLIED
+	initial-value CDATA #IMPLIED
+>
+<!-- =======================================================
+Element: reserved-parameter
+Appears in: component-specification
+
+Identifies a name which may not be used as an informal parameter.
+Informal parameters are typically HTML attribute names; this
+list identifies HTML attributes that are written exclusively
+by the component and may not be affected by informal parameters.
+
+Attributes:
+  name: The parameter name to reserve.
+-->
+<!ELEMENT reserved-parameter EMPTY>
+<!ATTLIST reserved-parameter
+	name CDATA #REQUIRED
+>
+
+<!-- =======================================================
+Element: set
+Appears in: bean
+
+Used to initialize a property of a managed bean.  The value
+is a binding reference, and is provided as the value attribute, 
+or as wrapped character data.
+
+Attributes:
+  name: The name of the property to be set.
+  value: The value (as a binding reference) to set the property
+    to.
+-->
+<!ELEMENT set (#PCDATA)>
+<!ATTLIST set
+	name CDATA #REQUIRED
+	value CDATA #IMPLIED
+>
+