cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: [C2] ScriptGenerator
Date Thu, 08 Mar 2001 15:25:11 GMT
Jason, If checked in your ScriptGenerator.

Could you please cross check it?

Thanks,

Giacomo

Jason Foster wrote:

> > I've put together a small generator that I would like to contribute to the
> Cocoon2 project.  This generator uses the BSF framework to allow developers
> to generate their XML using Python, JavaScript, etc.
>
> Using the generator is as easy as adding the following to the sitemap:
>
> <map:generator
>      name="script"
>      src="org.apache.cocoon.generation.ScriptGenerator"/>
>
> <map:match pattern="scripts/*">
>  <map:generate type="script" src="docs/samples/{1}"/>
>  <map:transform src="stylesheets/page/simple-page2html.xsl"/>
>  <map:serialize type="html"/>
> </map:match>
>
> Within your script you have access to all of the generator objects that
> looked interesting, including the Cocoon Logger.  XML is passed from the
> script to Cocoon using a StringBuffer named "output".  Check out the
> examples for more details.
>
> Cocoon2 already includes the Rhino JavaScript interpreter, so .js files
> will work immediately.  You can get the Jython interpreter at
> www.jython.org, and hopefully jython.jar will make it into the Cocoon2
> distribution.
>
> What I think might be interesting is that there is some early support for
> Perl in the BSF.  This might allow an elegant transition from Perl/CGI
> sites to Cocoon sites.
>
> I have attached a .tar.gz with the code.  Any comments on the code, style,
> approach, etc. would be greatly appreciated.
>
> Jason Foster

----------------------------------------
Content-Type: application/x-gzip; charset="US-ASCII"; 
name="ScriptGenerator.tar.gz"
Content-Transfer-Encoding: base64
Content-Description: 
----------------------------------------

----------------------------------------
Content-Type: text/plain; charset="us-ascii"; name="Anhang: 2"
Content-Transfer-Encoding: 7bit
Content-Description: 
----------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message