You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Joose Vettenranta <jo...@iki.fi> on 2004/07/06 13:07:23 UTC

Fwd: XMLFileModule problem

Hi,

I was told that this might be a bug in cocoon.

Currently using cocoon 2.1.3

I have in cocoon.xconf:

<component-instance  
class="org.apache.cocoon.components.modules.input.XMLFileModule"  
logger="core.modules.xml" name="joose">
  <file src="cocoon:/internal/config.xml" reloadable="true"  
cacheable="false" cache-xpaths="false" />
</component-instance>

in sitemap.xmap I have:

    <map:match pattern="internal/config.xml">
     <map:generate type="file" src="config/default.xml" />
     <map:serialize type="xml" />
    </map:match>

when first time read that config.xml file.. those values are stored. If  
I change that config/default.xml file to something else, old values are  
stil used. And even if I change that generate type="file" line, it  
still won't change values..

like .. <map:transform src="{joose:skin}.xsl" /> always loads the old  
skin, not the new changed one.

It's not going to change setting even if I push reload button like a  
maniac.

(I'm trying to create some sort of config-file, which users can change  
through webeditor, like skin and another settings)

I'm not on dev@ -list

Thanks, Joose

Edelleenlähetetyn viestin alku:

> Lähettäjä: Joose Vettenranta <jo...@iki.fi>
> Päiväys: 6. heinäkuuta 2004 12:49:11 GMT+03:00
> Vastaanottaja: users@cocoon.apache.org
> Aihe: XMLFileModule problem
> Vastaus: users@cocoon.apache.org
>
> Seems like that it does not read new settings..
>
> I changed file line to:
>
> <file src="cocoon:/internal/config.xml" reloadable="true"  
> cacheable="false" cache-xpaths="false" />
>
>
> then changed content of the config.xml
>
> reloaded many times.. -> still reading old values
>
> How to refresh those values?
>
> Thanks, Joose
>
> 6.7.2004 kello 12:40, Joose Vettenranta kirjoitti:
>
>  Seems like that is what I can use..
>>
>> I put in cocoon.xconf like this:
>>
>> <component-instance  
>> class="org.apache.cocoon.components.modules.input.XMLFileModule"  
>> logger="core.modules.xml" name="foo">
>>  <file src="cocoon:/internal/config.xml" />
>> </component-instance>
>>
>> and in sitemap
>>
>> <map:match pattern="internal/config.xml">
>>  <map:generate type="file" src="config.xml" />
>>  <map:serialize type="xml" />
>> </map:match>
>>
>> and it's working well =)
>>
>> Thanks,
>>
>> Joose
>>
>> 5.7.2004 kello 19:55, Stephan Coboos kirjoitti:
>>> I don't know wether it is what you want, but you can use the  
>>> PropertiesFileModule or the XMLFileModule to access config datas  
>>> coming from a (local) file:
>>>
>>> http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/ 
>>> modules/input/PropertiesFileModule.html
>>> http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/ 
>>> modules/input/XMLFileModule.html
>>>
>>> Regards
>>> Stephan
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>> --
>> "Always remember that you are unique, just like everyone else!"
>> * http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
> --
> "Always remember that you are unique, just like everyone else!"
> * http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *


Re: Fwd: XMLFileModule problem

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Joose Vettenranta wrote:

> Hi,
>
> I was told that this might be a bug in cocoon.
>
> Currently using cocoon 2.1.3
>
> I have in cocoon.xconf:
>
> <component-instance  
> class="org.apache.cocoon.components.modules.input.XMLFileModule"  
> logger="core.modules.xml" name="joose">
>  <file src="cocoon:/internal/config.xml" reloadable="true"  
> cacheable="false" cache-xpaths="false" />
> </component-instance>
>
> in sitemap.xmap I have:
>
>    <map:match pattern="internal/config.xml">
>     <map:generate type="file" src="config/default.xml" />
>     <map:serialize type="xml" />
>    </map:match>
>
> when first time read that config.xml file.. those values are stored. 
> If  I change that config/default.xml file to something else, old 
> values are  stil used. And even if I change that generate type="file" 
> line, it  still won't change values..
>
> like .. <map:transform src="{joose:skin}.xsl" /> always loads the old  
> skin, not the new changed one.
>
> It's not going to change setting even if I push reload button like a  
> maniac.


Joose,

Try CVS version of XMLFileModule. I think this issue is fixed already in 
the CVS.

Vadim