[Home] [By Thread] [By Date] [Recent Entries]
Roger L. Cauvin wrote:
It seems to me that I have struggled with closely the same problem. Developer env. and production env. having different execution paths. We found that using document('') caused more trouble than it solved. I have a few pointers for you: 1. If you want to use document('') (for whatever reason) and you don't know what path is sought, use resolve-uri('') and inspect its result. 2. Use either a configuration file (like Michael suggested as well) and put your path info in there, or use parameters for the same. 3. Use the use-when attribute to distinguish between Developer Env and Production Env. Simply set (or use) a global system property in your Production Env and get it through system-property(). Like this: <xsl:param name="base-path" select=" ' productionpath/bla.xslt ' " use-when = "system-property( ' application.context ' ) = 'production' " /> <xsl:param name="base-path" select=" ' developerpath/bla.xslt ' " use-when = "system-property( ' application.context ' ) != 'production' " /> Now, set "application.context" (or whatever) to "production" from your Production Env (and *do not* set it, or set it differently, on the dev. env). If you need some more help getting this to work more conveniently, just let me know, as we have created (I believe) quite a nice workaround for working with path problems between production and developer envs, without compromising stability. Cheers, Abel
|

Cart



