On Mon, 27 Oct 2008 22:48:14 +0100, Andreas Hartmann <[EMAIL PROTECTED]>
wrote:
> 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?

Thank you, with you answer :
1 - you open my eyes on an error that I read many, many times !!! Thank you
2 - I found the stupid error I made :
the post.xml in this uri <samples
uri="fallback://lenya/modules/forums/samples/post.xml"/> is a document that
reference two samples. But I don't modify the uri of each sample : they uri
was uri="fallback://lenya/modules/xhtml/samples/xhtml.xml" ; so I changed
to /modules/forums/ and all goes well !


>
> 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"/>
>

Okay !! This help me to understand how module works and now I can easy
redirect the processing of each resource type (I first do this redirect
with page-envelope:document-type)

Have a good day

>
>>     <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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to