forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyriaque Dupoirieux <Cyriaque.Dupoiri...@pcotech.fr>
Subject Re: [[use of a xconf variable]
Date Mon, 17 Jul 2006 12:34:32 GMT
le 17/07/2006 12:51 Ross Gardler a écrit :
> Cyriaque Dupoirieux wrote:
>> le 08/06/2006 16:20 Ross Gardler a écrit :
>
> ...
>
>> Ok, that's what I have done.
>> Now, here is the use of the two new properties in the internal.xmap :
>> <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html"
>>       name="xhtml" pool-grow="2" pool-max="64" pool-min="2"
>>       src="org.apache.cocoon.serialization.XMLSerializer">
>> *       <doctype-public>{project:doctype-public}</doctype-public>
>>       <doctype-system>{project:doctype-system}
>>         </doctype-system>
>> *       <encoding>UTF-8</encoding>
>>       <indent>yes</indent>
>>       <omit-xml-declaration>yes</omit-xml-declaration>
>>     </map:serializer>
>> And here is the generated html :
>>
>> <!DOCTYPE html PUBLIC "{project:dispatcher.doctype-public}" 
>> "{project:dispatcher:doctype-system}">
>>
>>
>> What's wrong ?
>> Any idea ?
>
> I missed the fact you were trying to configure a component with a 
> property. Unfortunately you can't. The prooperties module is loaded 
> during initialisation, i.e. at the same tie as the initialisation of 
> all the components. Therefore the property value is not available at 
> that time.
I am a little surprised because I have tried to replace my new property 
by one already used in the file : {request:locale} (Crazy thing I know)
Like the following :
<map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html"
      name="xhtml" pool-grow="2" pool-max="64" pool-min="2"
      src="org.apache.cocoon.serialization.XMLSerializer">
*      <doctype-public>{request:locale}</doctype-public> *
      <doctype-system>{project:doctype-system}
        </doctype-system>
       <encoding>UTF-8</encoding>
      <indent>yes</indent>
      <omit-xml-declaration>yes</omit-xml-declaration>
    </map:serializer>
And here is the generated html :

<!DOCTYPE html PUBLIC "{request:locale}" 
"{project:dispatcher:doctype-system}">

I think my problem may come what you say, but also of the fact that my 
properties are used in tags and not in tags attribute (like src='...')

>
> Is it possible to configure the serializer params in the match (you'll 
> need to check the Cocoon docs)? If so it will work there.
Exactly as we have done here...
>
> It's worth checking with the Cocoon folk wheter there is a way to use 
> sitemap params in the initialisation of components, but I don't think 
> there is (Bertrand had a similar problem recently with his i18n 
> improvements to Forrest).
Thank you,

Cyriaque,
>
> Ross
>
> Ross
>
>

Mime
View raw message