cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <>
Subject RE: Python Generator example
Date Fri, 25 Apr 2003 02:50:29 GMT
On Thu, 24 Apr 2003, Jeff Lowery wrote:

> > It seems to be getting a list of "programming languages" (around line
> > 113), which are set in WEB-INF/cocoon.xconf.  Likewise, the "python"
> > language class seems to reside in
> Which, according to the documentation, is where you'd expect to see a jython
> or python declaration.  But there isn't one there.

This is a good question.  After I found those lines in my previous
message, I thought to myself, "So where does it referency Jython?"  I
couldn't find it anywhere, I must have looked through all of the things
that could possibly reference Python or Jython, but to no avail.  I did
notice one thing where you have to have the first line of the Python
script have a special magic line, but I'm not so sure that is where Jython
is referenced.  It would be nice to know.

> > src/blocks/python/java/org/apache/cocoon/components/language/p
> > rogramming/python/,
> >
> > The very bottom at: public String getSourceExtension(), which
> > is overriden
> > from the ProgrammingLanguage interface, seems to be where the actual
> > extension is set.
> It doesn't seem very manageable to have extensions built-in this way.  What
> if I wanted to handle the extension some other way?

No, it doesn't.  Perhaps the extensions could be configured in
cocoon.xconf like so:

<python-language logger="core.language.python" name="python"

In fact, this would probably not be all that difficult.  However, I
noticed that getSourceExtension() only allows for one extension to be
used. So even if you can only specify one extension, it might be useful to
extend the PythonLanguage to be configurable in Avalon, and configure it
though there.  Then again, I'm not too familliar with the Avalon stuff, so
my suggestion might be totally off-base.


Tony Collen
ICQ: 12410567
Cocoon: Internet Glue (A Cocoon Weblog)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message