You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Florent André <fl...@4sengines.eu> on 2008/10/27 18:00:14 UTC

Re: [Forum module] (was "[Forum module] See the file before his transformation" in dev@lenya.apache.org)

On Mon, 25 Aug 2008 12:55:58 +0200, Andreas Hartmann <an...@apache.org>
wrote:
> Hi André,
>
> Florent André schrieb:
>
> […]
>
>>> It might be a lot easier to start with a clean forum module
>>> containing two resource types. Since resource types are global and not
>>> namespaced, I'd recommend something like
>>>
>>> * forum
>>> * forumpost
>>
>> Does Lenya have a module that implement two resource types ? Can you
> give
>> me his name in order to have an example please ?
>
> I don't think there is such a module, but this is not a problem. Just
> add all files that are needed for both resource types to the module.
> Alternatively, you could also use separate modules for the resource
> types if you find that more appropriate. From my PoV a single module is
> more convenient re. installation.

I would like to create a single module that contains two separate
ressources types (more elegant). 

I well create the "forums" module and the two resources types 
* forums
* post

I can create a forums resource and display it.
I can create a post, but after create it in the new document interface,
lenya throws an error (see the log4j report at the end of this mail).

It seem that the link between the post resources and the forums module is
not okay...

I create two <resource-types> in the cocoon.xconf : 

<!-- /////////////////////////////////// resource forums
////////////////////////////////////////////// -->
 <component-instance
class="org.apache.lenya.cms.publication.ResourceTypeImpl"
logger="lenya.resourcetypes.forums" name="forums">
    <!-- Default time in seconds until the resource-type has expired -->
    <expires seconds="3600"/>
    <schema namespace="http://relaxng.org/ns/structure/0.9"
uri="fallback://lenya/modules/collection/resources/schemas/collection.rng"/>
    <sample mime-type="application/xml"
uri="fallback://lenya/modules/forums/samples/forums.xml"/>
    <format name="xhtml" uri="cocoon://modules/forums/xhtml.xml"/>
    <format name="include" uri="cocoon://modules/forums/include.xml"/>
    <format name="rss" uri="cocoon://modules/forums/rss.xml"/>
    <format name="header" uri="cocoon://modules/forums/header.xml"/>
  </component-instance>

<!-- /////////////////////////////////// resource post
////////////////////////////////////////////// -->
 <component-instance
class="org.apache.lenya.cms.publication.ResourceTypeImpl"
logger="lenya.resourcetypes.post" name="post">
    <schema namespace="http://relaxng.org/ns/structure/0.9"
uri="fallback://lenya/modules/forums/resources/schemas/post.rng"/>
    <!-- Default time in seconds until the resource-type has expired -->
    <expires seconds="3600"/>
    <samples uri="fallback://lenya/modules/forums/samples/post.xml"/>
    <link-attribute xpath="//*[namespace-uri() =
'http://www.w3.org/1999/xhtml']/@href"/>
    <link-attribute xpath="//*[namespace-uri() =
'http://www.w3.org/1999/xhtml']/@data"/>
    <link-attribute xpath="//*[namespace-uri() =
'http://www.w3.org/1999/xhtml']/@src"/>
    <format name="xhtml" uri="cocoon://modules//xhtml.xml"/>
    <format name="webdavGET" uri="cocoon://modules/forums/davget.xml"/>
    <format name="xslt-clean"
uri="fallback://lenya/modules/forums/xslt/clean-xhtml.xsl"/>
    <format name="icon" uri="cocoon://modules/forums/icon"/>
 </component-instance>


My question is : Is it the name="post" (in <component-instance>) that link
the resource to the module ? 


thank you.

--- the log4j error after press the "create" button -----
2008-10-27 15:01:31,143 [http-8080-Processor24] ERROR
sitemap.handled-errors - Sitemap: error when calling sub-sitemap
        at <map:mount> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/sitemap.xmap:620:106
        at <map:serialize type="xml"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:97:38
        at <map:generate> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:96:79
        at <map:serialize type="xml"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:127:36
        at <map:serialize type="xml"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:200:36
        at <map:transform type="uuid2url"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:199:41
        at <map:transform type="metaData"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:195:40
        at <map:transform type="i18n"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:177:36
        at <map:transform> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:163:57
        at <map:transform> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:162:79
        at <map:generate> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:161:130
        at <map:serialize type="xhtml"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:329:40
        at <map:transform type="proxy"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:326:38
        at <map:transform> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:323:92
        at <map:transform> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:295:79
        at <map:transform> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:278:98
        at <map:generate> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:265:168
        at <map:mount> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/global-sitemap.xmap:343:116
        at <map:mount> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/sitemap.xmap:680:106
org.apache.cocoon.ProcessingException: Sitemap: error when calling
sub-sitemap
        at <map:mount> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/sitemap.xmap:620:106
        at <map:serialize type="xml"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:97:38
        at <map:generate> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:96:79
        at <map:serialize type="xml"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:127:36
        at <map:serialize type="xml"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:200:36
        at <map:transform type="uuid2url"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:199:41
        at <map:transform type="metaData"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:195:40
        at <map:transform type="i18n"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:177:36
        at <map:transform> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:163:57
        at <map:transform> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:162:79
        at <map:generate> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:161:130
        at <map:serialize type="xhtml"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:329:40
        at <map:transform type="proxy"> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:326:38
        at <map:transform> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:323:92
        at <map:transform> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:295:79
        at <map:transform> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:278:98
        at <map:generate> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/lenya/pubs/default/sitemap.xmap:265:168
        at <map:mount> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/global-sitemap.xmap:343:116
        at <map:mount> -
file:///home/florent/4sengines/serveur/tomcat/webapps/lenya/sitemap.xmap:680:106
        at
org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:113)
        at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:122)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
        at
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
        at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
        at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.buildPipeline(ConcreteTreeProcessor.java:193)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.buildPipeline(TreeProcessor.java:267)
        at
org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.java:333)
        at
org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:215)
        at
org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:65)
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at $Proxy3.getSource(Unknown Source)
        at
org.apache.excalibur.source.impl.AbstractSourceResolver.resolveURI(AbstractSourceResolver.java:146)
        at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at $Proxy10.resolveURI(Unknown Source)
        at
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
        at
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:555)
        at
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:542)
        at
org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.resolveURI(MutableEnvironmentFacade.java:299)
        at
org.apache.cocoon.generation.FileGenerator.setup(FileGenerator.java:79)
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:387)
        at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:730)
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:503)
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.prepareInternal(AbstractProcessingPipeline.java:517)
        at
org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.java:343)
        at
org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:215)
        at
org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:65)
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at $Proxy3.getSource(Unknown Source)
        at
org.apache.excalibur.source.impl.AbstractSourceResolver.resolveURI(AbstractSourceResolver.java:146)
        at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at $Proxy10.resolveURI(Unknown Source)
        at
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
        at
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:555)
        at
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:542)
        at
org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.resolveURI(MutableEnvironmentFacade.java:299)
        at
org.apache.cocoon.sitemap.ContentAggregator.setup(ContentAggregator.java:290)
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:387)
        at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:730)
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:503)
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.prepareInternal(AbstractProcessingPipeline.java:517)
        at
org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.java:343)
        at
org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:215)
        at
org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:65)
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at $Proxy3.getSource(Unknown Source)
        at
org.apache.excalibur.source.impl.AbstractSourceResolver.resolveURI(AbstractSourceResolver.java:146)
        at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at $Proxy10.resolveURI(Unknown Source)
        at
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
        at
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
        at
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
        at
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
....
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.cocoon.sitemap.PatternException: Cannot get variable
'lenya/modules//sitemap.xmap' in expression
'{fallback:lenya/modules/{1}/sitemap.$
        at
org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.processModule(PreparedVariableResolver.java:280)
        at
org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.resolve(PreparedVariableResolver.java:209)
        at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:89)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
        at
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
        at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
        at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.buildPipeline(ConcreteTreeProcessor.java:193)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.buildPipeline(TreeProcessor.java:267)
        at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:111)
        ... 155 more
Caused by:
org.apache.avalon.framework.configuration.ConfigurationException: Resolving
fallback source [lenya/modules//sitemap.xmap] failed:
        at
org.apache.lenya.cms.cocoon.components.modules.input.FallbackModule.resolveSourceUri(FallbackModule.java:126)
        at
org.apache.lenya.cms.cocoon.components.modules.input.FallbackModule.getAttribute(FallbackModule.java:113)
        at
org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.processModule(PreparedVariableResolver.java:272)
        ... 167 more
Caused by: java.lang.RuntimeException: Resolving path
[fallback://lenya/modules//sitemap.xmap] failed:
        at
org.apache.lenya.cms.cocoon.source.FallbackSourceFactory.findSource(FallbackSourceFactory.java:224)
        at
org.apache.lenya.cms.cocoon.source.FallbackSourceFactory.getSource(FallbackSourceFactory.java:129)
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at $Proxy51.getSource(Unknown Source)
        at
org.apache.excalibur.source.impl.AbstractSourceResolver.resolveURI(AbstractSourceResolver.java:146)
        at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at $Proxy10.resolveURI(Unknown Source)
        at
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
        at
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541)
        at
org.apache.lenya.cms.cocoon.components.modules.input.FallbackModule.resolveSourceUri(FallbackModule.java:123)
        ... 169 more
Caused by: org.apache.lenya.cms.module.ModuleException: The module [] is
not registered!
        at
org.apache.lenya.cms.module.ModuleManagerImpl.getBaseURI(ModuleManagerImpl.java:39)
        at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
        at $Proxy12.getBaseURI(Unknown Source)
        at
org.apache.lenya.cms.cocoon.source.FallbackSourceFactory.findSource(FallbackSourceFactory.java:204)
        ... 184 more






---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: [Forum module] (was "[Forum module] See the file before his transformation" in dev@lenya.apache.org)

Posted by Andreas Hartmann <an...@apache.org>.
Hi André,

Florent André schrieb:

[…]

> <!-- /////////////////////////////////// resource post
> ////////////////////////////////////////////// -->
>  <component-instance
> class="org.apache.lenya.cms.publication.ResourceTypeImpl"
> logger="lenya.resourcetypes.post" name="post">
>     <schema namespace="http://relaxng.org/ns/structure/0.9"
> uri="fallback://lenya/modules/forums/resources/schemas/post.rng"/>
>     <!-- Default time in seconds until the resource-type has expired -->
>     <expires seconds="3600"/>
>     <samples uri="fallback://lenya/modules/forums/samples/post.xml"/>
>     <link-attribute xpath="//*[namespace-uri() =
> 'http://www.w3.org/1999/xhtml']/@href"/>
>     <link-attribute xpath="//*[namespace-uri() =
> 'http://www.w3.org/1999/xhtml']/@data"/>
>     <link-attribute xpath="//*[namespace-uri() =
> 'http://www.w3.org/1999/xhtml']/@src"/>

>     <format name="xhtml" uri="cocoon://modules//xhtml.xml"/>

that URI is wrong, the module name is missing. Maybe this is causing the 
error?

Since you have two resource types in the forum module, you probably need 
some kind of resource type identifier in the format URI, for instance a 
prefix:

   <format name="xhtml" uri="cocoon://modules/forums/forums/xhtml.xml"/>
   <format name="xhtml" uri="cocoon://modules/forums/post/xhtml.xml"/>


>     <format name="webdavGET" uri="cocoon://modules/forums/davget.xml"/>
>     <format name="xslt-clean"
> uri="fallback://lenya/modules/forums/xslt/clean-xhtml.xsl"/>
>     <format name="icon" uri="cocoon://modules/forums/icon"/>
>  </component-instance>
> 
> 
> My question is : Is it the name="post" (in <component-instance>) that link
> the resource to the module ? 

No, the resource type name has no relation to the module. You have to 
reference the module in the URIs for format, schema etc.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org