I am attempting to add Python script processing capability to the
ScriptGenerator using jython.
I placed jython.jar in the cocoon/WEB-INF/lib directory
Cocoon version is 2.0.1 dated 2/26/02
Erased the work directory before starting
Here is my modified "script" generator entry in sitemap.xmap:
<map:generator name="script"
src="org.apache.cocoon.generation.ScriptGenerator"
logger="sitemap.generator.script" label="content,data" >
<add-languages>
<language name="python" src="org.python.util.PythonInterpreter">
<extension map:value="py"/>
</language>
</add-languages>
</map:generator>
This fails during sitemap compilation due to the sitemap_xmap.java
code being cut short in the middle of the ScriptGenerator code
Here is the actual message from the sitemap log:
ERROR (2002-04-15) 11:34.20:312 [sitemap] (/cocoon/welcome)
HttpProcessor[8080][4]/Handler: Error compiling sitemap
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
sitemap_xmap:
Line 588, column 38: '}' expected.
----- sitemap_xmap.java has the following code
{ DefaultConfiguration cconf1 =
new DefaultConfiguration("script", LOCATION);
cconf1.addAttribute ("name", "script");
cconf1.addAttribute ("src",
"org.apache.cocoon.generation.ScriptGenerator");
cconf1.addAttribute ("logger", "sitemap.generator.script");
cconf1.addAttribute ("label", "content,data");
//line numbers not supported with xalan
{
DefaultConfiguration cconf2 =
new DefaultConfiguration("add-languages", LOCATION);
cconf1.addChild(cconf2);
//line numbers not supported with xalan
{
DefaultConfiguration cconf3 =
new DefaultConfiguration("language", LOCATION);
cconf3.addAttribute ("name", "python");
cconf3.addAttribute ("src",
"org.python.util.PythonInterpreter");
cconf2.addChild(cconf3);
//line numbers not supported with xalan
{
DefaultConfiguration cconf4 =
new DefaultConfiguration("extension",
LOCATION);
cconf4.addAttribute ("map:value", "py");
cconf3.addChild(cconf4);
--------- here the code abruptly stops, the last line is # 588.
[EMAIL PROTECTED]
Author of Soap Programming with Java - Sybex; ISBN: 0782129285
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>