Johannes Lichtenberger wrote:
> 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!") }If you get a 'HELLO' this means that Spring loads the generator and not that the pipeline is invoked. >> >> 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> If you use Cocoon as a web application, the base directory src/main/resources/COB-INF. Put your sitemap there. All releative paths are calculated from there. >> >> 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) :-/ -- Reinhard Pötz Managing Director, {Indoqa} GmbH http://www.indoqa.com/en/people/reinhard.poetz/ Member of the Apache Software Foundation Apache Cocoon Committer, PMC member [email protected] ________________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
