RE: Accessing Global Variables As External File
> -Original Message- > From: Andrew Stevens [mailto:[EMAIL PROTECTED] > The way we do it is by defining an external entity in the > internal DTD i.e. > > > > ]> > http://apache.org/cocoon/sitemap/1.0";> > ... > > > > &environment; > > > ... Thanks for that. Works well. Thanks to Ralph Goers for the parameters suggestion too. I might look into that later but I'm still on 2.1.8 at the moment. Gary * The information contained in this message may be confidential or legally privileged and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Accessing Global Variables As External File
From: "Stewart, Gary" <[EMAIL PROTECTED]> Date: Wed, 24 May 2006 16:57:42 +0100 Hi there, I was wondering if it was possible to access the global-variables component configuration as an external file? Basically there are some values in there that change depending on which server I was using so I figured I could separate that into a static XML file and not include that file in version control so I could customise it depending on the server. Is there a way to do this or should I use something other than global-variables to access these values in the sitemaps. The way we do it is by defining an external entity in the internal DTD i.e. ]> http://apache.org/cocoon/sitemap/1.0";> ... &environment; ... where environment.ent is of the form myfoo dev_bar_database Possibly I should have included the global-variables tags in there too, but I figured I might want to specify some other variables directly in the sitemap. The only drawback we've found with this approach is that, unlike when the sitemap changes, we have to restart the application for it to see any changes in the environment.ent file. In the same way, I externalised the database configuration from cocoon.xconf, since that was the only part which differed between our development/testing/production environments. Andrew. Thanks, Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing Global Variables As External File
The latest version of Cocoon lets you use property files. You can define your global variables but make their values be ${varname}. Then define the variable in your property file and Cocoon will substitute it. Ralph Stewart, Gary wrote: Hi there, I was wondering if it was possible to access the global-variables component configuration as an external file? Basically there are some values in there that change depending on which server I was using so I figured I could separate that into a static XML file and not include that file in version control so I could customise it depending on the server. Is there a way to do this or should I use something other than global-variables to access these values in the sitemaps. Thanks, Gary * The information contained in this message may be confidential or legally privileged and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. * - 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]
Accessing Global Variables As External File
Hi there, I was wondering if it was possible to access the global-variables component configuration as an external file? Basically there are some values in there that change depending on which server I was using so I figured I could separate that into a static XML file and not include that file in version control so I could customise it depending on the server. Is there a way to do this or should I use something other than global-variables to access these values in the sitemaps. Thanks, Gary * The information contained in this message may be confidential or legally privileged and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]