Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 35200 invoked from network); 18 Nov 2005 04:29:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Nov 2005 04:29:47 -0000 Received: (qmail 46436 invoked by uid 500); 18 Nov 2005 04:25:01 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 45665 invoked by uid 500); 18 Nov 2005 04:24:53 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 40476 invoked by uid 99); 18 Nov 2005 04:23:56 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 17 Nov 2005 20:22:53 -0800 Received: (qmail 8292 invoked by uid 65534); 18 Nov 2005 04:15:53 -0000 Message-ID: <20051118041553.8290.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r345438 [243/286] - in /cocoon/site/site/2.1: ./ developing/ developing/portal/ developing/portal/coplets/ developing/webapps/ developing/webapps/authentication/ faq/ howto/ installing/ plan/ plan/documentation/ plan/otherplanning/ plan/ove... Date: Fri, 18 Nov 2005 04:13:22 -0000 To: cvs@cocoon.apache.org From: crossley@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Added: cocoon/site/site/2.1/userdocs/velocity-generator.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/userdocs/velocity-generator.html?rev=345438&view=auto ============================================================================== --- cocoon/site/site/2.1/userdocs/velocity-generator.html (added) +++ cocoon/site/site/2.1/userdocs/velocity-generator.html Thu Nov 17 20:00:02 2005 @@ -0,0 +1,1340 @@ + + + + + + + +Velocity Generator + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+

Velocity Generator

+ +

Velocity Generator

+
+

Allows Velocity template to be used as a generator. Builds upon the Velocity +servlet functionality - overrides the output method in order to pipe the results +into SAX events.

+
    + +
  • Name : velocity
  • + +
  • Class: org.apache.cocoon.generation.VelocityGenerator
  • + +
  • Cacheable: ????.
  • + +
+
+
+<map:generate type="velocity"/>
+
+  
+

Cocoon Generator that produces dynamic XML SAX events from a Velocity +template file.

+ +

Sitemap Configuration

+

Attributes:

+
    + +
  • usecache (optional; default: 'false'): set to 'true' to enable template +caching on the 'cocoon' resource loader
  • + +
  • checkInterval (optional; default: '0'): This is the number of seconds +between modification checks when caching is turned on. When this is an integer +> 0, this represents the number of seconds between checks to see if the +template was modified. If the template has been modified since last check, then +it is reloaded and reparsed. Otherwise nothing is done. When <= 0, no +modification checks will take place, and assuming that the property cache +(above) is true, once a template is loaded and parsed the first time it is used, +it will not be checked or reloaded after that until the application or servlet +engine is restarted.
  • + +
+

Child Elements:

+
    + +
  • <property name="propertyName" value="propertyValue"/> (optional; +0..n): An additional property to pass along to the Velocity template engine +during initialization
  • + +
  • <resource-loader name="loaderName" class="javaClassName"/> (optional; +0..n; children: property*): The default configuration uses the 'cocoon' resource +loader which resolves resources via the Cocoon SourceResolver. Additional +resource loaders can be added with this configuration element. Configuration +properties for the resource loader can be specified by adding a child property +element of the resource-loader element. The prefix +'<name>.resource.loader.' is automatically added to the property name. +
  • + +
  • <export-object key="objectMapKey" name="velocityContextName"/> +(optional; 0..n): Export the object specified by key from the Cocoon +object map to the Velocity context of the template. The object can be accessed +from the template as name. Be careful to use a valid VTL variable name. +
  • + +
+

Default Java objects exported to the Velocity context:

+
    + +
  • request (org.apache.cocoon.environment.Request): The Cocoon current request +
  • + +
  • template (java.lang.String): The path of the template file currently being +evaluated
  • + +
  • response (org.apache.cocoon.environment.Response): The Cocoon response +associated with the current request
  • + +
  • context (org.apache.cocoon.environment.Context): The Cocoon context +associated with the current request
  • + +
  • parameters (org.apache.avalon.framework.parameters.Parameters): Any +parameters passed to the generator in the pipeline
  • + +
+ +
+
+ +
 
+
+ + + Propchange: cocoon/site/site/2.1/userdocs/velocity-generator.html ------------------------------------------------------------------------------ svn:eol-style = native