Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 57839 invoked from network); 15 Apr 2004 15:52:51 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 15 Apr 2004 15:52:51 -0000 Received: (qmail 6562 invoked by uid 500); 15 Apr 2004 15:52:27 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 6510 invoked by uid 500); 15 Apr 2004 15:52:27 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 6311 invoked from network); 15 Apr 2004 15:52:25 -0000 Received: from unknown (HELO confixx.bestiole.ch) (66.111.0.243) by daedalus.apache.org with SMTP; 15 Apr 2004 15:52:25 -0000 Received: from [192.168.0.165] (michel.wod.ch [62.220.137.25]) by confixx.bestiole.ch (8.11.6/8.11.6) with ESMTP id i3FFqP419108; Thu, 15 Apr 2004 17:52:25 +0200 Mime-Version: 1.0 (Apple Message framework v613) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Bertrand Delacretaz Subject: GroovyMarkup syntax works! Date: Thu, 15 Apr 2004 17:52:27 +0200 To: dev@cocoon.apache.org X-Mailer: Apple Mail (2.613) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I've just commited a GroovyMarkup [1] generator sample in the BSF block, allowing the ScriptGenerator to use syntax like this: xml.page() { content() { section() { title("GroovyMarkup test") p("Look ma, no angle brackets!") ul() { for(i in 1..5) { li("This is item " + i) } } } } } Thanks to James Strachan who very quickly fixed a problem in Groovy's SAXBuilder. I've committed a snapshot of the Groovy jar with the fix, this will have to be replaced with the next release when it's available. Next step would be to allow the (way cool) Groovy Sql syntax [2] to be used for database queries. It should be easy to implement, by making a ConnectionProvider available to the scripts so that a groovy.sql.Sql object can be created to use Connections from the Cocoon pool (I'm thinking of having the ScriptGenerator release them to keep scripts simple). I won't have time to work on it right now, so if someone wants to jump in... -Bertrand [1] http://groovy.codehaus.org/markup.html [2] http://groovy.codehaus.org/sql.html