cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: (sub)sitemap context
Date Wed, 31 Oct 2001 20:37:48 GMT
> -----Original Message-----
> From: Torsten Curdt [mailto:tcurdt@dff.st]
> Sent: Wednesday, October 31, 2001 11:06 AM
> To: cocoon-dev@xml.apache.org
> 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: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message