As soon as I try to use the resolver like this:
       path = resolver.resolveURI(".");
or
       path = resolver.resolveURI("sitemap.xmap");

I get this error at compile time:
" Error:  line (36) cannot access org.apache.excalibur.source.SourceResolver

file org\apache\excalibur\source\SourceResolver.class not found"

I have this line in my source
import org.apache.cocoon.environment.SourceResolver;

And I don't find a path in my cocoon tree for org\apache\excalibur\

So I'm unable to use SourceResolver.



Carsten Ziegeler wrote:

You have to use the SourceResolver. Each sitemap component (action,
generator, transformer) gets this object either in the act() method
or in the setup() method.
if you pass a relative path into the SOurcerResolver it's resolved
relative to the current sitemap.

HTH
Carsten




...
Hello

I'm searching to obtain the directory path (absolute or relative to the main cocoon directory) for the currently used sitemap.
I don't find a method.
I've traversed the doc, the sample...without result.


Many samples which seams to use such an information are hard coded and become false if there are moved See, for exemple, the samples:
/samples/modules/realpath.html
/samples/sources/xsp/file
...
and how they works.


...









Reply via email to