You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2008/10/27 22:48:14 UTC

Re: [Forum module] (was "[Forum module] See the file before his transformation" in dev@lenya.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