cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Using Jython in Cocoon
Date Sat, 29 Jun 2002 15:17:32 GMT
> From: Lassi Immonen [mailto:lassi.immonen@valkeus.com]
> 
>  >Have you tried Python XSPs in Cocoon 2.1-dev?
> 
> Yes, but it had some problems with indents at that time (like 1,5
months
> ago) and I couldn't get my own tests to run. It actually had something
> to do with to way I intended xml-tags in xsp file. I quickly tried to
> look for the problem, but it seemed too complicated for me.
> 
> I have to test has those bugs gone away.

Don't bother: it was not changed since then, and unless you ideally
indent your XML tags it will not work (that's because every tag is
Python instruction).


> I really like to treat logic inside python and then shoot xml out of
it
> than rather wrap my code in xml. XSP:s are so messy.

The only disadvantage of your approach is performance loss. Unless you
want to shoot SAX events out of your script by the usage of
contentHandler, performance of your approach will be lower then XSP's.


>  >Have a look at PythonGenerator in 2.1. IIRC, it pre-"compiles"
Python
>  >scripts.
> 
> Do you think it would be possible to get this "pre-compile" thing
> happening at ordinary generator, not in component/language/markup/xsp
> generator.

I don't remember details, but I guess it should be possible, and Store
can be used to save pre-compiled scripts.

Vadim


> I don't understand Cocoon structure well enough to answer to this
question.
> 
> Lassi
> 


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


Mime
View raw message