Jean-Christophe Kermagoret schrieb:
> No answer from [EMAIL PROTECTED], try [EMAIL PROTECTED]
>
> Hi,
> I'm using C22 from trunk svn :
>
> I have created blocks through archetypes :
> * cms
> * common
> * locator
>
> 1) Block definitions
>
> They all define public blocks through
> META-INF/cocoon/spring/servlet-service.xml
>
> In cms/META-INF/cocoon/spring/servlet-service.xml, I have :
>      <bean id="org.openbluelab.cms.block"
> class="org.apache.cocoon.sitemap.SitemapServlet">
>        <servlet:context mount-path="/content"
> context-path="blockcontext:/cms/"/>
>      </bean>
>
> In common..., I have :
>      <bean id="org.openbluelab.common.block"
> class="org.apache.cocoon.sitemap.SitemapServlet">
>        <servlet:context mount-path="/common"
> context-path="blockcontext:/common/"/>
>      </bean>
>

I think the servlet connections are missing. To get stuff from cms block
in commons block this should look like

<bean id="org.openbluelab.common.block"
class="org.apache.cocoon.sitemap.SitemapServlet">
  <servlet:context mount-path="/common"
context-path="blockcontext:/common/" >
    <servlet:connections>
      <entry key="cms" value-ref="org.openbluelab.cms.block"" />
    </servlet:connections>
  </servlet:context>
</bean>

> In locator, I have :
>      <bean id="org.openbluelab.locator.block"
> class="org.apache.cocoon.sitemap.SitemapServlet">
>        <servlet:context mount-path="/locator"
> context-path="blockcontext:/locator/"/>
>      </bean>
>
> 2) Sitemaps
>
> In cms/COB-INF/sitemap.xmap, I have the following snippet :
> ...
>            <map:match pattern="config/conf.xml">
>                <map:generate src="docs/config/conf.xml"/>
>                <map:serialize type="xml"/>
>            </map:match>
> ...
>
> ==> /content/config/conf.xml returns expected xml
>
> In common/COB-INF/sitemap.xmap , I have the following snippet :
> ...
>            <map:match pattern="test">
>                <map:generate
> src="blockcontext:/content/config/conf.xml"/>
>                <map:serialize type="xml"/>
>            </map:match>

And this should look like

<map:match pattern="test">
  <map:generate src="servlet:cms:/config/conf.xml"/>
  <map:serialize type="xml"/>
</map:match>


It may also help to read the cforms migration guide what can give you an
idea of how it works.
http://cocoon.zones.apache.org/dev-docs/2.2/blocks/forms/1.0/1351_1_1.html

HTH
Felix

Reply via email to