cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Lichtenberger <Johannes.Lichtenber...@uni-konstanz.de>
Subject Re: Writing generator / Cocoon3 alpha
Date Mon, 08 Mar 2010 02:36:10 GMT
On Sat, 2010-03-06 at 13:19 +0100, Johannes Lichtenberger wrote:
> On Sat, 2010-03-06 at 07:21 +0100, Jos Snellings wrote:
> > Johannes, you need one or two things beside the code of the generator.
> > - first, how is it invoked? Can you send the fragment of your
> > sitemap.xmap that matches an url supposed to invoke this generator?
> > - second, is there a line in sitemap-components that defines this
> > generator?
> 
> Jep, but the invokation isn't the problem, because the class itself is
> going to be invoked like testeted with:
> 
> static { System.out.println("HELLO!") }
> 
> Ok, my little sitemap:
> 
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap"
> xmlns:servlet="http://apache.org/cocoon/servlet" 
>   xmlns:controller="http://apache.org/cocoon/controller"> 
> 
>   <map:pipelines>
>     <map:pipeline>
>       <map:match pattern="">
>         <map:read src="welcome.html" />
>       </map:match>
>       <map:match pattern="treetank">
>         <map:generate type="sax" src="src/main/resources/test"/>
>         <map:serialize type="xml"/>
>       </map:match>
>     </map:pipeline>    
>   </map:pipelines>
>   
> </map:sitemap>
> 
> and the component definitions:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
>   
>   <bean name="generator:sax"
> class="org.treetank.cocoon.generating.SAXGenerator" scope="prototype"/>
>   <bean name="generator:xquerysax"
> class="org.treetank.cocoon.generating.XQuerySAXGenerator"
> scope="prototype"/>
>   <bean name="transformer:xpathsax"
> class="org.treetank.cocoon.transforming.XPathSAXTransformer"
> scope="prototype"/>
>   
> </beans>

Maybe anyone a good idea or advice? Sadly, it's a university project and
it should be working on the 18th (and I still have to write test cases
-- also for our XPathTransformer) :-/

greetings,
Johannes




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


Mime
View raw message