> -----Original Message-----
> From: Torsten Curdt [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 31, 2001 11:06 AM
> To: [EMAIL PROTECTED]
> Subject: RE: (sub)sitemap context
> 
> > > I can take care of this then...
> > >
> > > The only question is: shouldn't the sitemap itself set
> > > it's context path depending on the sitemap's file path
> >
> > Wait here for a second: URI space where sitemap is mounted could be
> > different from the physical location on the disk. Please do not
mount
> > sitemap based on directory it is located in. For sub-sitemaps, we
have
> > two attributes: URI-prefix and sitemap file (or directory where it
is
> > located).
> 
> Heaven no! :)
> 
> I like examples:
> 
>    <map:mount uri-prefix="sub" src="some/dir/below/sitemap.xmap"/>
> 
> Now this means the context dir of this sitemap should be
"some/dir/below".
> Same for the root sitemap defined in the cocoon.xconf:
> 
>    <sitemap file="some/dir/below/root-sitemap.xmap"/>
> 
> Now for the mounted sub sitemaps this works just fine - but not for
> the root sitemap.
> 
> Thoughts?

I might be get it wrong... But what I see is: for sub-sitemap,
invocation code we have is:

        sitemapManager.invoke (
        this.manager, environment, substitute(listOfMaps,"<xsl:value-of
select="@uri-prefix"/>"),
        substitute(listOfMaps,"<xsl:value-of select="@src"/>"),
        <xsl:value-of select="$check-reload"/>, <xsl:value-of
select="$reload-method"/>);

For the root sitemap, the invocation code is:

        sitemapManager.invoke(
        this.componentManager, environment, "",
        this.sitemapFileName,
        this.checkSitemapReload, this.reloadSitemapAsynchron);

Inside sitemapManager.invoke, there is a line:

        environment.changeContext(uri_prefix, source);

And if you go into AbstractEnvironment, we see:

        if(prefix.length()>=1){

So, the change of context occurs only for non-root (URI prefix != "")
sitemaps.


Vadim

> --
> Torsten



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to