You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Marcus Crafter <cr...@fztig938.bank.dresdner.net> on 2001/07/16 12:22:25 UTC

[C2] Resolving paths in configure ?

Hi!

	Hope everything is going well for all. 

	I have a question regarding the configuration of cocoon2 components
	when specifying filenames, and how they are resolved to correct
	locations.

	In the I18NTransformer that I'm updating, I've found that I need to
	specify a directory path at 'configuration' time, however
	unfortunately there is no SourceResolver available in the 'configure'
	method, like there is in 'setup'.

	In the FOPSerializer there is a similar issue, if one wants to set the
	'user-config' variable, the 'src' attribute needs an absolute path.

	What would be great is to be able to resolve these paths independantly
	of where each particular webapp is located, so that absolute paths
	don't have to be specified - is there any way to obtain a
	SourceResolver (or similar) object outside of methods that provide
	them in their signature ?

	Cheers,

	Marcus

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


AW: [C2] Resolving paths in configure ?

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Marcus Crafter wrote:
> 
> Hi!
> 
> 	Hope everything is going well for all. 
> 
> 	I have a question regarding the configuration of cocoon2 components
> 	when specifying filenames, and how they are resolved to correct
> 	locations.
> 
> 	In the I18NTransformer that I'm updating, I've found that I need to
> 	specify a directory path at 'configuration' time, however
> 	unfortunately there is no SourceResolver available in the 
> 'configure'
> 	method, like there is in 'setup'.
> 
> 	In the FOPSerializer there is a similar issue, if one wants 
> to set the
> 	'user-config' variable, the 'src' attribute needs an absolute path.
> 
> 	What would be great is to be able to resolve these paths 
> independantly
> 	of where each particular webapp is located, so that absolute paths
> 	don't have to be specified - is there any way to obtain a
> 	SourceResolver (or similar) object outside of methods that provide
> 	them in their signature ?
> 
This is a rather difficult task. Currently the SourceResolver is actually
the Environment. So technically speaking you need access the current
environment object to resolve a source.
The environment is required here as it resolves a source according to
the location of the sitemap, making subsitemaps and resolving their
sources work.

So with each request the SourceResolver object changes. That's the main
reason why this is not an Avalon component.

Does anyone see an easy solution for this?

Carsten

> 	Cheers,
> 
> 	Marcus
> 
> -- 
>         .....
>      ,,$$$$$$$$$,      Marcus Crafter
>     ;$'      '$$$$:    Computer Systems Engineer
>     $:         $$$$:   Open Software Associates GmbH
>      $       o_)$$$:   82-84 Mainzer Landstrasse
>      ;$,    _/\ &&:'   60327 Frankfurt Germany
>        '     /( &&&
>            \_&&&&'     Email : Marcus.Crafter@osa.de
>           &&&&.        Business Hours : +49 69 9757 200
>     &&&&&&&:
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org