cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: Cocoon Ant Task
Date Thu, 01 Apr 2004 10:37:27 GMT
Simon Mieth wrote:

>On Wed, 31 Mar 2004 16:33:36 -0500
>"Corey Keith" <> wrote:
>>I'm trying to use the CocoonTask from ant and when I
>>include the load-class element in the cocoon target I get
>>the following error. Below is my build.xml.
>>C:\vets\build.xml:10: Class
>>org.apache.cocoon.CocoonTask$ElementWrapper doesn't
>>support nested text data.
>>Is this a bug or should I be loading database driver
>>classes differently with ant?
>><project default="generate" basedir=".">
>> <property name="cocoon.context"
>> value="/cocoon-2.1.4/build/webapp"/><path
>> id="cocoon.classpath">
>>  <dirset dir="${cocoon.context}/WEB-INF/classes"/>
>>  <fileset dir="${cocoon.context}/WEB-INF/lib"
>>  includes="*.jar"/>
>> </path>
>> <taskdef name="cocoon"
>> classname="org.apache.cocoon.CocoonTask"
>> <target name="generate">
>>  <cocoon verbose="true" classpathref="cocoon.classpath"
>>follow-links="true" precompile-only="false"
>>confirm-extensions="false" context-dir="${cocoon.context}"
>>config-file="WEB-INF/cocoon.xconf" work-dir="build/work"
>>dest-dir="build/dest" default-filename="hello.html"
>>   <broken-links type="xml" file="brokenlinks.xml"
>>   generate="false"
>>   <load-class>sun.jdbc.odbc.JdbcOdbcDriver</load-class>
>>   <logging
>>   log-kit="${cocoon.context}/WEB-INF/logkit.xconf"
>>logger="cli" level="DEBUG"/>
>>   <uris name="vets" follow-links="true">
>>    <uri type="append" src-prefix="vets/"
>>    src="vetslist.html"
>>   </uris>
>>  </cocoon>
>> </target>
>the CocoonTask doesnt support text-nodes like load-class,
>you have to add this to cocoon-task element as attribute.
> <cocoon ...
>     load-class="   ">
>            ....
> </cocoon>
>But unfortunalety it is impossible to use then more
>load-class-elements in this way, or is there a another way? 
>Or must this add to the CocoonTask with "NestedElement" for
>load-class and other (Upayavira? ;-))? 
Hi Simon!

No, in this way it doesn't support multiple classes. We could either use:

<cocoon load-class="class, class"> or <load-class class="xxx"/>

Either would do it. Fancy making a patch?

I don't use databases with Cocoon, and thus have never used nor tested 
this load-class functionality (but I added it because I saw that there 
would be a need). If someone can tell me whether or not it works, I'd 
really apprecaite that!

Regards, Upayavira

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

View raw message